package morning.cat;

import feign.Feign;
import feign.gson.GsonDecoder;
import morning.cat.client.PersonClient;
import morning.cat.code.PersonDecoder;
import morning.cat.entity.Person;
import morning.cat.service.UrlService;

/**
 * @describe: 类描述信息
 * @author: morningcat.zhang
 * @date: 2019/6/4 2:00 PM
 */
public class PersonTest {

    public static void main(String[] args) {

        PersonClient personService = Feign.builder()
                //.decoder(new GsonDecoder())
                .decoder(new PersonDecoder())
                .target(PersonClient.class, UrlService.SERVER_URL);

        Person person = personService.findById(6);
        System.out.println(person);
    }
}
